import "reflect-metadata";
import {Entity,Column,PrimaryColumn} from "typeorm";
import {createConnection,ConnectionOptions} from "typeorm";

/**
 * 连接配置（Oracle）
 */
let conn:ConnectionOptions = {
    type:"oracle",
    host:"192.168.5.30",
    port:1521,
    sid:"ats60",
    username:"SYSTEM",
    password:"hXmNDg1tSam8",
    autoSchemaSync:false
};

/**
 * 查找用户表
 */
createConnection(conn).then(connection=>{
    connection.query("SELECT * FROM TNMS.T_USER where ID = 'huyl'")
        .then(value=>{
            console.log("------- execute sql on oracle -------");
            console.log(value);
            console.log("-------------------------------------");
        },error=>console.log(error.message));
},error=>console.log(error.message));